#!/usr/bin/env perl

use warnings;

undef $/;
open IN, "util/cpp_version ability.cc|" or die "Can't read ability.cc\n";
$_ = <IN>;
close IN;

s/.*Ability_List\[\] =(.*?)};.*/$1/s
    or die "Can't find Ability_List[] in ability.cc\n";

print join("\n", sort /ABIL_[A-Z0-9_]+\s*,\s*"([*-Za-z0-9 '-]+)"/sg), "\n";
